< previous page page_6 next page >

Page 6
0006-01.jpg
Figure 1.2.
Using the Visual Basic File | Open dialog
box to set the DatabaseName property.
When you have located the BOOKS5.MDB file and selected OK, Visual Basic inserts the complete drive, path, and filename of the database file into the input area, linking the database and your program together. Always double-check this property to make sure that you correctly selected the desired database.
Note.gif
People often use the words database and data table interchangeably. Throughout this book, data table is used to refer to a single table of data and database is used to refer to a collection of related tables. For example, the Titles table and the Publishers table are two data tables in the BOOKS5 database.

Now that you know what database you will use, you must select the data table within that database that you want to access by setting the RecordSource property of the data control. You can do this by locating the RecordSource property in the Properties window, single-clicking the property, and then single-clicking the small down arrow to the right of the property input box. This brings up a list of all the tables in the BOOKS5.MDB database, as shown in Figure 1.3. For the first database program, you will use the Titles data table in the BOOKS5.MDB database.
0006-02.jpg
Figure 1.3.
Setting the RecordSource
property to the Titles table.

 
< previous page page_6 next page >

If you like this book, buy it!